package com.yike.product.param;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yike.common.api.Update;
import com.yike.common.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 商品表
 *
 * @author yike
 * @since 2024-07-17
 */
@Data
@Accessors(chain = true)
@ApiModel(value = "添加商品")
public class AddGoodsParam implements Serializable {
    private static final long serialVersionUID = 1L;

    @NotNull(message = "店铺ID不能为空")
    @ApiModelProperty(value = "店铺ID", required = true)
    private Long shopId;

    @NotBlank(message = "商品条码不能为空")
    @ApiModelProperty(value = "商品条码", required = true)
    private String barcode;

    @NotBlank(message = "商品名称不能为空")
    @ApiModelProperty(value = "商品名称", required = true)
    private String name;

    @ApiModelProperty("商品图片")
    private String image;

    @ApiModelProperty("商品售价")
    private BigDecimal sellPrice;

    @ApiModelProperty("商品进价")
    private BigDecimal buyPrice;

    @ApiModelProperty("分类id")
    private Long categoryId;

    @ApiModelProperty("商品规格")
    private String specification;

    @ApiModelProperty("生产厂家名称")
    private String manufacturerName;

    @ApiModelProperty("品牌")
    private String brand;

    @ApiModelProperty(value = "生产时间", example = "2020-01-01")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date manufacturerTime;

    @ApiModelProperty(value = "到期时间")
    private String expireTime;

    @ApiModelProperty("描述")
    private String description;

    @ApiModelProperty("备注")
    private String remark;

}
